package com.usian.comment.controller;

import com.usian.api.comment.ApCommentLikeApi;
import com.usian.comment.service.ApCommentLikeService;
import com.usian.model.comment.dtos.CommentLikeDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/commentLike")
public class ApCommentLikeController implements ApCommentLikeApi {


    @Autowired
    ApCommentLikeService apCommentLikeService;


    /**
     * 点赞某一条评论
     * @param dto
     * @return
     */
    @PostMapping("/like")
    @Override
    public ResponseResult like(@RequestBody CommentLikeDto dto) {
        return apCommentLikeService.like(dto);
    }
}
